/* 
 * File:   Object.cpp
 * Author: mauro
 * 
 * Created on 8 de septiembre de 2014, 18:44
 */

#include "Object.h"

Object::Object() {
}

Object::Object(b2Body *body, SkinFactory *skin) {
    this->body = body;
    this->skin = skin;
}
Object::~Object() {

    printf("Destructor de Object\n");
}
//float* Object::getPosition(){
//    b2Body* body = this->body;
//    this->body->getP
//    float x = body->GetPosition().x;
//    float y = body->GetPosition().y;
//    
//    // donde libero esta memo???
//    float* pos = new float[1];
//    pos[0] = x;
//    pos[1] = y;
//
//    return pos;
//}
b2Vec2 Object::getPosition(){
    b2Body* body = this->body;
    return body->GetPosition();    
}


float Object::getAngle(){
    return this->body->GetAngle();
}

float Object::getAngularVelocity(){
    return this->body->GetAngularVelocity();
}

b2Body* Object::getBody(){
    return this->body;
}

SkinFactory* Object::getSkin(){
    return this->skin;

}

void Object::setAngularVelocity(float velocity){
    this->body->SetAngularVelocity(velocity);
}

